Field of the Disclosure
The disclosure is related to a data storing method and an embedded system, and more particularly to a data storing method and an embedded system having high write counts.
Description of Related Art
Generally speaking, a conventional embedded system uses an electrically erasable programmable read only memory (EEPROM) as a storage medium for storing small data, which has an advantage of writing and erasing in unit of bytes and allows for a lot of ease when writing multiple units of small data. However, as the capacity of flash memory increases with lower price, the EEPROM in an embedded system becomes relatively expensive and is gradually replaced by the flash memory which is less expensive.
However, unlike EEPROM which performs erase operation in unit of bytes, the flash memory always has to erase a whole block when executing an erase instruction. When a file with smaller data, e.g. a bootloader of a system or configuration of network setting is stored in a block of the flash memory, as the file is updated, the system needs to clear the whole block where the file is stored and then stores the updated file in the original block, which makes the flash memory to have far less re-write counts compared to the EEPROM.